<div id="loginbox">
<?php
  if ($_SESSION['user']) {
?>
	You are <?php print $_SESSION['user']; ?>. 
	<a href="logout.php" >Logout </a>?;
<?php
  } else {
?>
  	<a href="register.php" >Register</a> or Log in (<a href="forgotpassword.php">forgot password</a>?).
	<form action="hall.php" method="post">
	<label for="username">Username</label>
	<input name="username" type="text" />
	<label for="password">Password</label>
	<input name="password" type="password" />
	<input type="submit" value="Ok" />
	</form>
<?php
  }
?>
</div>
